<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<include file="Public:meta" />
    <style>
    	.MemberAvatar{ width:50px; height:50px; }
		div.table .datatable td.CommentContent{ text-align:left; padding:3px 5px;}
		 .rank1{ color: red;}
		.rank2{ color: blue;}
		.rank3{ color: green;}
    </style>
</head>
<body id="main_page">
<include file="Public:position" />
<div class="container">
    <div class="table">
        <div class="toolbars">
            <li class="toolbar"><b>评论对象：</b><a href="{$InfoID|InfoUrl}" target="_blank">{$InfoID|InfoTitle}</a></li>
        </div>
        <table class="datatable" id="datatable">
            <thead>
            <tr>
                 <th width="70px" >评论人</th>
                 <th width="70px" ></th>
                 <th>内容</th>
                 <th width="80px">评论等级</th>
                 <th width="80px">是否审核</th>
                 <th width="135px">时间</th>
            </tr>
            <volist name="Data" id="d" key="j">
                <tr>
                    <td><img src="{$d.MemberAvatar}" class="MemberAvatar" /><br />
                    <notempty name="d.GuestName">{$d.GuestName}<else/>匿名</notempty>
                    </td>
                    <td colspan="2" class="CommentContent">{$d.CommentContent}</td>
                    <td>
                        <span class="rank{$d.CommentRank}">
                            <switch name="d.CommentRank">
                                <case value="1">差评</case>
                                <case value="2">中评</case>
                                <case value="3">好评</case>
                            </switch>
                        </span>
                    </td>
                    <td>            
                        <eq name="d.IsCheck" value="0">
                            <span style="color:#F00;">未审核</span>
                        <else/>
                            <span style="color:#000;">已审核</span>
                        </eq>
                    </td>
                    <td>{$d.CommentTime|strtotime|yd_friend_date}</td>
                </tr>
                </thead>
                <tbody>
                    <notempty name="d.ReplyComments">
                            <volist name="d.ReplyComments" id="rc">
                                <tr class="rc{$rc.CommentID}">
                                    <td></td>
                                    <td><img src="{$rc.MemberAvatar}" class="MemberAvatar" /><br/>
                                    <notempty name="rc.GuestName">{$rc.GuestName}<else/>匿名</notempty></td>
                                    <td class="CommentContent">{$rc.CommentContent}</td>
                                    <td></td>
                                    <td></td>
                                    <td>{$rc.CommentTime|strtotime|yd_friend_date}</td>
                                </tr>
                            </volist>
                    </notempty>
                </tbody>
            </volist>
            <tfoot style="background:#F3F3F3;">
                <tr>
                    <td colspan="2"></td>
                    <td style="padding:8px 0;">
                        <input  id="btnSubmit"  type="button" value="返回" class="GoBack"  onclick="GoBack()" />
                    </td>
                    <td colspan="3"></td>
                </tr>       
            </tfoot>                
        </table>
    </div>
</div>
</body>
</html>
<script>
function GoBack(){
	window.location.href = "{$Url}index";
}
</script>